import Vue from 'vue';

import 'normalize.css/normalize.css'; // A modern alternative to CSS resets

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

import '@/styles/index.scss'; // global css

import App from './App';
import store from './store';
import router from './router';

import _ from 'lodash';
import '@/filters';
import '@/directive';
import '@/icons'; // icon
import '@/permission'; // permission control
import qnPath from '@/utils/qnPath';
Vue.use(qnPath);

import echarts from 'echarts';
Vue.prototype.$echarts = echarts;

Vue.use(ElementUI);
Vue.use(_);

import Avatar from '@/components/TIM/avatar.vue';
import tim from './tim';
import TIM from 'tim-js-sdk';
window.tim = tim;
window.TIM = TIM;
window.store = store;
Vue.prototype.$bus = new Vue(); // event Bus 用于无关系组件间的通信。
Vue.prototype.tim = tim;
Vue.prototype.TIM = TIM;
Vue.prototype.$store = store;
Vue.component('avatar', Avatar);
Vue.config.productionTip = false;

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
});
